package hello

import (
	"context"

	v1 "demo/api/hello/v1"
	"demo/internal/dao"
	"demo/internal/model/do"
)

func (c *ControllerV1) UserUpdate(ctx context.Context, req *v1.UserUpdateReq) (res *v1.UserUpdateRes, err error) {
	// return nil, gerror.NewCode(gcode.CodeNotImplemented)
	_, err = dao.User.Ctx(ctx).Data(do.User{
		Name:   req.Name,
		Age:    req.Age,
		Status: req.Status,
	}).WherePri(req.Id).Update()
	return
}
